//
//  KingViewController.m
//  OCUI
//
//  Created by Mac on 15-11-6.
//  Copyright (c) 2015年 King. All rights reserved.
//

#import "KingViewController.h"
#import "TestViewController.h"

@interface KingViewController ()

@end

@implementation KingViewController



- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
    //田字动画
    UIView * line = [[UIView alloc]initWithFrame:CGRectMake(0, 200, 0, 6)];
    line.backgroundColor = [UIColor blackColor];
    [self.view addSubview:line];
    
    
    UIView * line2 = [[UIView alloc]initWithFrame:CGRectMake(self.view.frame.size.width/2.0, 0, 0, 6)];
    line2.backgroundColor = [UIColor redColor];
    [self.view addSubview:line2];
    
    
    UIView * line3 = [[UIView alloc]initWithFrame:CGRectMake(40, 160, 0, 6)];
    line.backgroundColor = [UIColor blackColor];
    [self.view addSubview:line3];
    
    
    UIView * line4 = [[UIView alloc]initWithFrame:CGRectMake(self.view.frame.size.width/2.0, 0, 0, 6)];
    line.backgroundColor = [UIColor blackColor];
    [self.view addSubview:line4];
    
    
    
    [UIView animateWithDuration:0.6 animations:^{
        line.frame = CGRectMake(0, 200, self.view.frame.size.width, 3);
    }completion:^(BOOL finish){
        [UIView animateWithDuration:0.6 animations:^{
            line2.frame = CGRectMake(self.view.frame.size.width/2.0, 0, 3, self.view.frame.size.height);
        }];
    }
     ];
    
    
}


- (void)onClick:(id)semder
{
    TestViewController * con = [TestViewController new];
    [self.navigationController pushViewController:con animated:YES];
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
